import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/views/HomeView.vue'
import Category from '@/views/CategoryView.vue'
import Car from '@/views/CarView.vue'
import Mine from '@/views/MineView.vue'
// 引入动画组件
import TransitionCom from '@/views/TransitionCom.vue'
// 引入传送门组件
import TelportCom from '@/views/TelportCom.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      component: Home
    },
    {
      path: '/category',
      component: Category
    },
    {
      path: '/car',
      component: Car
    },
    {
      path: '/mine',
      component: Mine
    },
    {
      path: '/transition',
      component: TransitionCom
    },
    {
      path: '/telport',
      component: TelportCom
    }
  ]
})

export default router
